careful handling of things that are not guaranteed to be elements