added null if statement