Your PHP is throwing a parsing error that you aren't configured to display. Change you error reporting so you can see the parsing error first and foremost.
Now you will the the problem; your IF statement's condition must be enclosed in parenthesis.
On to your actual goal, to return a row if username is NULL (or not null, either way). Add WHERE username IS NULL to the query.
This will return zero rows if the username isn't null, so you just need to check the count of rows returned with mysql_num_rows(), you don't even have to fetch anything to get what you need.
If you will be fetching the resultset anyway, then there's another way you can do it. Use the IFNULL() MySQL function. This function gives you the opportunity to specify an alternate value if a column is null, and the column's value if a column isn't null. Example:
SELECT IFNULL(username, 'NOT FOUND') FROM `members` WHERE `id`=1
Read the manual for more info: