improve error message for bad attribute values
  closes PR 14340