Refactored rif40_ddl_checks()