this is my code to check if the value of column is not null
if(!res.getString(res.getColumnIndex("answerquestionid")).trim().equals("")){
but I get this:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.trim()' on a null object reference
What is the proper way to check if value return by res is empty