added null checker