[ticket/416] Use instanceof check in get_module()

B3P-416