handling isnull and not null checks