[ticket/416] Cast return of can_add_module() to boolean

B3P-416
[ticket/416] Add tests for can_add_module()

B3P-416