KERNEL: if a kernel is invalid give an error!