message: Tweak MemoryManager::CheckHostMemoryType_ for better clarity and
  to avoid throwing exceptions.
  Ensure that MemoryManager::CheckHostMemoryType_ is not called
  with a NULL pointer.
diff: @@ -800,7 +800,7 @@ bool MemoryManager::MemoryClassCheck_(MemoryClass mc, void *h_ptr,
  void *MemoryManager::ReadWrite_(void *h_ptr, MemoryType h_mt, MemoryClass mc,
  size_t bytes, unsigned &flags)
  {
  - MemoryManager::CheckHostMemoryType_(h_mt, h_ptr, flags & Mem::ALIAS);
  + if (h_ptr) { CheckHostMemoryType_(h_mt, h_ptr, flags & Mem::ALIAS); }
  if (bytes > 0) { MFEM_VERIFY(flags & Mem::REGISTERED,""); }
  MFEM_ASSERT(MemoryClassCheck_(mc, h_ptr, h_mt, bytes, flags),"");
  if (IsHostMemory(GetMemoryType(mc)) && mc < MemoryClass::DEVICE)
  @@ -824,7 +824,7 @@ void *MemoryManager::ReadWrite_(void *h_ptr, MemoryType h_mt, MemoryClass mc,
  const void *MemoryManager::Read_(void *h_ptr, MemoryType h_mt, MemoryClass mc,
  size_t bytes, unsigned &flags)
  {
  - CheckHostMemoryType_(h_mt, h_ptr, flags & Mem::ALIAS);
  + if (h_ptr) { CheckHostMemoryType_(h_mt, h_ptr, flags & Mem::ALIAS); }
  if (bytes > 0) { MFEM_VERIFY(flags & Mem::REGISTERED,""); }
  MFEM_ASSERT(MemoryClassCheck_(mc, h_ptr, h_mt, bytes, flags),"");
  if (IsHostMemory(GetMemoryType(mc)) && mc < MemoryClass::DEVICE)
  @@ -848,7 +848,7 @@ const void *MemoryManager::Read_(void *h_ptr, MemoryType h_mt, MemoryClass mc,
  void *MemoryManager::Write_(void *h_ptr, MemoryType h_mt, MemoryClass mc,
  size_t bytes, unsigned &flags)
  {
  - CheckHostMemoryType_(h_mt, h_ptr, flags & Mem::ALIAS);
  + if (h_ptr) { CheckHostMemoryType_(h_mt, h_ptr, flags & Mem::ALIAS); }
  if (bytes > 0) { MFEM_VERIFY(flags & Mem::REGISTERED,""); }
  MFEM_ASSERT(MemoryClassCheck_(mc, h_ptr, h_mt, bytes, flags),"");
  if (IsHostMemory(GetMemoryType(mc)) && mc < MemoryClass::DEVICE)
  @@ -1371,10 +1371,16 @@ void MemoryManager::CheckHostMemoryType_(MemoryType h_mt, void *h_ptr,
  bool alias)
  {
  if (!mm.exists) {return;}
  - // const bool known = mm.IsKnown(h_ptr);
  - // const bool alias = mm.IsAlias(h_ptr);
  - MFEM_VERIFY(alias || h_mt == maps->memories.at(h_ptr).h_mt,"");
  - MFEM_VERIFY(!alias || h_mt == maps->aliases.at(h_ptr).mem->h_mt,"");
  + if (!alias)
  + {
  + auto it = maps->memories.find(h_ptr);
  + MFEM_VERIFY(it != maps->memories.end() && h_mt == it->second.h_mt,"");
  + }
  + else
  + {
  + auto it = maps->aliases.find(h_ptr);
  + MFEM_VERIFY(it != maps->aliases.end() && h_mt == it->second.mem->h_mt,"");
  + }
  }
  MemoryManager mm;
  