Since `typeof` is operator, not a function, so i'd prefer `if (typeof orientations != "string")`