Simplifying mode comparison by using array check rather than separate eq...

...uality checks.

Simplifying per @ameyp's suggestion. Much cleaner!