I found that even if an ArrayList is null, the List.isEmpty
will still return a true value for unknown reason. In another word, use (blockodeList!=null && !blockodeList.isEmpty())
instead of just the second one to see if it is safe to operate the ArrayList.