Only call callback if it exists.