I know I can find out if a variable is null in Java using these techniques:
(var==null) -> too much worktry { ... } catch (Null
What has worked really beautifully to me is catching the exception where it normally gets thrown and then using Log to see whether any of them have 'null' values.
My code:
try {
if (description_visible) advice_title_cur.setText(all_title_array[pos]);
else advice_title_cur.setText(all_title_array[pos] + "...");
} catch (NullPointerException e) {
e.printStackTrace();
Log.e("My name", "description_visible " + description_visible);
Log.e("My name", "advice_title_cur " + advice_title_cur);
Log.e("My name", "all_title_array " + all_title_array);
Log.e("My name", "pos " + pos);
}