update and change to how nulls are checked