Fixes NullPointerExceptions in Material and OfflineUser