Handling of empty (whitespaces) or corrupted input

https://trello.com/c/16lRl7FW/1793-fix-matter-compiler