Check for valid element types.

Invalid remote data should never cause exceptions.