No, you cannot. But there are sentences with no subject at all, they are called impersonal.
"Мне нечего делать" does not have any subject. Literally, it's like "To me (there is) nothing to do".
I think, technically, "нечего" is the object here. But the object is often used in genitive if there is a negation.
Consider:
Я знаю его имя (accusative) - I know his name.
but
Я не знаю его имени (genitive) - I do not know his name.