Added checking and error throwing for params

Kept it relatively simple. Felt errors were the best way to deal with
problems as it wouldn't involve having to deal with return or callback.