def float_or_None(x):
    """
    A little helper function to return an float from our record or
    None if it is an empty string.

    Arguments:
    - `x`: the value returned from database row e.g. record.get('x')
    """

    if x is None:
        return None
    elif x in ("", " "):
        return None
    else:
        try:
            return float(x)
        except:
            return None