title: I have a Method invocation 'simpleEditText.getText()' may produce 'java.lang.NullPointerException' error and would like it removed
body: <p>Very new to Android Studio. Working on first app using EditText. I would like to fix the line of code below so I don't get the error: I have a Method invocation 'simpleEditText.getText()' may produce 'java.lang.NullPointerException' error and would like it removed. Any suggestions would be great. I think this means I need to check if simpleEditText has a null value before I getText?</p>
  
  <pre><code>/*
   * Retrieve Edit Text Values
   */
      EditText simpleEditText = (EditText) findViewById(R.id.editLat);
      String strValue = simpleEditText.getText().toString();
  </code></pre>
  
  <p>This is the XML resource associated with editLat:</p>
  
  <pre><code>&lt;EditText
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:inputType="numberDecimal"
          android:singleLine="true"
          android:lines="1"
          android:textSize="15dp"
          android:hint="@string/lat_hint"
          android:id="@+id/editLat"
          android:layout_below="@+id/textAsset"
          android:layout_toEndOf="@+id/textView3" /&gt;
  </code></pre>