added null check while lifting sql expressions