fixing wrong usage if isNull