Check if variable is React node or array

Solution 1:

React has a function just to check if a variable is an element, here's the docs.

React.isValidElement()