Checks if input is set and adds to master array