Update index.php

Added isset check. Fixes #252