Make sure the function returns a HashMap instead of null.