properly handle null data when denormalizing

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10794
| License       | MIT
| Doc PR        | 
Changed it to ``is_array($data) || is_object($data)`` since you can traverse an object's public properties.