Adding logic to handle compliance with returned items that should only be objects and functions.