Move type check after we get the type