Fixed URL:build() method, added check for object to string convertion