Make sure that H and S are not NULLs