Set ``apply_close`` option if and only if callback is function.