Added safety asserts in a validate function in system