Move badge param validation into separate function

Change-Id: Ib413fc304fc86ab6401cc07b23bc5b5f85fc941d
Merge "Move badge param validation into separate function"