backwards support, and ensure that spec is an object before performing operations