Safer checking for fields, and repeat fields with a single occurence.
Merge pull request #5 from adam-vessey/7.x

Safer checking for fields, and repeat fields with a single occurence.