per code review, removing unnecessary pointer check