Use
if(isset($_SESSION['username']))
This will only be true if the session data contains something called 'username'. That data is stored on the server, and only a session ID is sent to the client.
It's possible for someone else to steal that session ID from someone else, but if they don't use it fairly soon, the server will delete the data anyway, and the stolen session ID will be invalid.
The other exploit I can think of would be to store fake session data on the server, but basic scripting security (preventing them from uploading a file called "/tmp/sess_2b4ed124c3e741213bb8d0187063c217", basically)
would mean they'd have to actually crack the server itself to do so, and if they can do that then session hijacking is the least of your worries!
It's better to double-check the contents of the session variable against the user database; as well - it's as easy to do as not, so why not?