Centralize casting to SafeCast