Combine if-statements and reject promise on false