DRY up field element type checking.