Input checks.

Change-Id: I416a585e6ea1eed5f2afbd35f4475a8e9380a387