Correctly define $defaults as an array.

Additionally, invert the `if` condition to unnecessary avoid early `return`.

WDYT?