Fixed nil interface check in tests