[5.0] Changed type hint to a contract