Check the data param is set before clearing it