Fix parsing bug in comparison in ZDef

string::compare returns 0 if an exact match is achieved, we now
correctly interpret this.

Added some safety checks for NULL vectors.