[Fix] Replace is_a with instanceof to get namespace