new script API

fixes https://github.com/bitpay/bitcore/issues/602
`_.isUndefined` would do the same and is more idiomatic I feel