More sophisticated routing, checking for parameter type