Fixed gettype.php when there is no data in database