charm: better error checking in ParseURL

I noticed that some invalid charm URLs were parsing as if they were OK.

Couldn't this check better be in line 158 direct after splitting?