added null check for internal properties