It does not look like we need above if since we are typecasting value to T at the end.