Modify setData type checking to be type hint