how to isinstance(x, module)?
<p>I need to test if a variable is a module or not. How to do this in the cleanest way?</p>

<p>I need this for initializing some dispatcher function and I want that the function can accept either dict or module as an argument.</p>
