Made the match more robust checking for null condition