call callback only if passed