throwing if not in objectmode