removed useless null checks