replace isinstance(...,dict) checks with Mapping

see #76

Signed-off-by: Erik Bernoth <erik.bernoth@gmail.com>