def safe_to_float(x):
    """Convert to float, handling None and non-float inputs.

    Useful for cleaning complicated output from variant callers.
    """
    if x is None:
        return None
    else:
        try:
            return float(x)
        except ValueError:
            return None