Removed PHP notice messages

Edited a few IFs with if (isset($var)) to get rid of PHP notice messages.