diff --git src/instagramImport.php src/instagramImport.php
index df2adeb..496c592 100644
--- src/instagramImport.php
+++ src/instagramImport.php
@@ -92,7 +92,7 @@ class instagramImport {
 
   private function processPosts($items, $type, $hashtag = NULL) {
 
-    if(count($items[0]) > 0) {
+    if(!is_null($items[0]) && count($items[0]) > 0) {
     } else {
       \Drupal::logger('instagram_importer')->notice('Importer has run. No post(s) could be found. Are you sure your settings are correct?');
       return;
