CDB-2893 more fixes and safety checks
CDB-2893 added validation check + spec