Attributes: remove unnecessary element null check