Clearer type checking for HashMap/create