moved comment
added missing null checks