Add code to check dynamic new argument is valid.

  Also do not make it an error to have a statically initialized
zero length vector, as it is a valid object and allowed to be
created at runtime.