One thing I learnt from this is we should write instanceof generic types like this:
boolean a = (m instanceof Map<?,?>);
Oh well, before I usually suppress the warning by adding:
@SuppressWarnings("rawtypes")
or by using this:
boolean a = Map.isInstance(m);