Actually, looking further, I can't cast to string here; null (not "") is required to get a protocol relative URL, an empty string generates urls starting with "://" instead of "//".