Throw exception if alias is invalid.