only test type if we have an object