function to check for isset and empty; using serialize and unserialize with arrays