fix: validate compiler arguments

Not sure if this is JavaScriptish way of doing those checks, but at least arguments are verified now. I've bumped already several times into obscure err messages from a compiler when not providing a second argument so I really like to fix this one, this way or another.