Why is there sometimes a space after an if and sometimes not?