Use isset() as suggested by @PVince81