If I don't add this exception a can't read "x" from "undefined" exception will be thrown, so I thought throwing an understandable exception would be more helpful.