Provide suitable error message for build indexes that are out of bounds (#121)

PR is attempting to patch #121
You can simply use `if build_number and ...`. Also please no empty line afterward.