Check promise state property before resolving