added custom errors for checking module and adapter types. Test for module type check