Updated to QGIS 2.0 support.
Catch invalid input.