Moved typeof array to Array.isArray