Refactor: minor null check