Check if module is defined not if it's a function