Updated conditional to only return input if object