NullPointerException when trying to check permissions

if (ActivityCompat.checkSelfPermission(ActivityName.this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(ActivityName.this, new String[]{
        android.Manifest.permission.ACCESS_FINE_LOCATION
}, 10);

}

Try with your ActivityName.this


if (ActivityCompat.checkSelfPermission((Activity)mContext, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
    ActivityCompat.requestPermissions((Activity)mContext, new String[]{
            android.Manifest.permission.ACCESS_FINE_LOCATION
    }, 10);
}

Try to use (Activity)mContext instead of this. it may help.