                always on vm limit has been reached.""", "UsageLimitReached"
 
         if resize?
-          if resize > userPlan.storage
+          if isNaN resize
+            return callback new KodingError \
+            'Requested new size is not valid.', 'WrongParameter'
+          else if resize > userPlan.storage
             return callback new KodingError \
             """Requested new size exceeds allowed
                limit of #{userPlan.storage}GB.""", "UsageLimitReached"

    { r: { group, user, account }, clientIP } = client

    storage ?= 3
    userIp   = clientIP or user.registeredFrom?.ip
    provider = 'koding'



          if alwaysOn?
            fieldsToUpdate['meta.alwaysOn'] = alwaysOn

          if resize?

            storageSize = machine.meta?.storage_size ? 3
