guard against boolean and function opts.key values
0.11.1