Make URL parsing more lenient (accept Object as argument)