Used isset to check if value is set

Used isset to check if value is set to fix errors in PHP 5.5+