asMap function
Implementation
Map<String, dynamic> asMap(dynamic value){
  try{
    if(value is Map<String, dynamic>){
      return value;
    }
    return jsonDecode(value);
  }catch(e){
    logNUI("NUIEnt", "Failed to decode json of value : $value");
    return {};
  }
}