Added exception to match and multi-match queries if passed an invalid type param

Closes #4964