Added some safety features in handling the IMEID