refactor: more readable condition

Wrapping into a promise (when provided non-promise but required a promise) and throwing an error (when required non-promise and provided promise).