fixed error in the display code for items on the front end

when checking the values on username and realname, need to make sure they are not null first