Check for nulls before setting visibilty