added isNull condition