Empty Timeout Check

If $timeout is empty a notice is displayed in line 32. Added a check
for empty to get rid of it
Merge pull request #1 from danielpataki/master

Got rid of a notice from line 32