Fix typeof incorrectness

It should either be:
if(ko === undefined) ...
or
if(typeof(ko) === 'undefined')

but currently that line will never hit the throw statement.
Merge pull request #447 from JeffreyBrownEnlighten/master

Fix typeof usage