adding null check
fixing typo