I have a `listview` with `adapter` extending `BaseAdapter` in Fragment. On that `listview` I have implemented `scrollview` listener that detect when user reach the end of `listview`. In that case more data will load. Also I have a button on that fragment which on click will reset all filters and reload the list with starting items. Problem is when user is scrolling bottom and in same time (before new elements are loaded) press button app will crash with following error:

```
java.lang.Boolean cannot be cast to ba.store.models.Merchants

```

This is the code where it's breaking apart:

```
 @Override
public View getView(int position, View convertView, ViewGroup parent) {
    View view = null;
    Integer identity;
    ViewHolder viewHolder = null;
    notifyDataSetChanged();
    if (convertView == null) {
        view = LayoutInflater.from(parent.getContext()).inflate(R.layout.sales_place_item, parent, false);
        viewHolder = new ViewHolder(view);
        view.setTag(viewHolder);

    } else {
        view = convertView;
        viewHolder = (ViewHolder) view.getTag();

    }
    Merchants merchants = (Merchants) getItem(position);
    if (merchants != null) {
        identity = merchants.getMerchantId();
        viewHolder.merchant_name.setText(merchants.getMerchantName());
        viewHolder.merchant_category.setText(merchants.getCategoryName().toUpperCase());
        viewHolder.border_limit.setText(merchants.getBorderLimitAmount().toString() + " KM");
        viewHolder.end_loyalty.setText(merchants.getEndLoyaltyPoints().toString());
        viewHolder.begin_loyalty.setText(merchants.getStartLoyaltyPoints().toString());

        if (merchants.getImagePath().equals(""))
            Picasso.with(view.getContext()).load(R.drawable.placeholder_sales).fit().into(viewHolder.merchant_image);
        else
            Picasso.with(view.getContext()).load(merchants.getImagePath()).fit().into(viewHolder.merchant_image);

    }

    return view;

}

```

getItem method:

```
@Override
public Object getItem(int position) {
    if (merchants.size() > 0) {
        return merchants.get(position);
    } else
        return false;
}

```