Throw a more descriptive error when a missing "category" property is encountered

Adds a more descriptive error message when a missing "category" property is encountered.

current message:

```
Cannot call method 'toLowerCase' of undefined
```
an example of the new error:
```
COLOR_INDIGO_DARK did not contain a "category" property
```
I also removed some trailing whitespace.