More robust check for relative urls