def valid_column(data, column):
    """checks if given 'column' is present and if it has nonnull values in it
    """
    if column in data.columns and data[column].isnull().sum() == 0:
        return True
    else:
        return False