My splash screen keeps on crashing and forceclosing the app : My app keeps on crashing upon startup please check my code.I was doing an automatic login on my splash screen. Please help me, this is for my thesis.

**splash.class**

    import android.content.Intent;
    import android.database.Cursor;
    import android.os.Handler;
    import android.support.v7.app.AppCompatActivity;
    import android.os.Bundle;
    import android.database.sqlite.SQLiteDatabase;
    import android.database.sqlite.SQLiteOpenHelper;

    import static com.example.mgimoro.dietgo.Database.TABLE_NAME;

    public class Splash extends AppCompatActivity {
    SQLiteDatabase db;
    SQLiteOpenHelper helper;
    Database database;
    int id=0;
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_splash);
        initialize();
    }
    public void initialize(){
    db=helper.getReadableDatabase();
        String query = "SELECT ID FROM " + TABLE_NAME
                + " WHERE ID = (ID)";
        Cursor c = db.rawQuery(query, null);
        if (c.moveToFirst()) {
            id=c.getInt(c.getColumnIndex(query));
        }else{}
        if (id<0){
            Intent homeIntent = new Intent(Splash.this, Onboard.class);
            startActivity(homeIntent);
            finish();
        }else{
            Intent homeIntent = new Intent(Splash.this, mainmenu.class);
            startActivity(homeIntent);
            finish();
          }
       }
      }