(if opts.if() is true) creates a deferral, passes the resolver into arg1 and returns the promise