Using proper method to check if ref is closed.