prevent errors with non-objects