Cast inconsistent WPT types