Use the type conversion method to clean up the code.