Is this necessary? If so, whenever this check fails, the function will implicitly return undefined, and everything that calls this function needs to be able to handle an undefined return value. I think it would either make sense to return an empty, resolved promise or just not care.