BS-6657
Fix return type check