Please avoid to cast the value and check `$defaultUrl` against `null`