Coding style, added different exception message when $expand === FALSE