Add some validation to elements before attempting to process them.

This change makes butterknife less prey to upstream compilation problems causing thrown exceptions rather than reported errors.