Remove unnecessary checks
Remove unnecessary intermediate assignment